﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using Microsoft.Win32;
using System.Runtime.InteropServices;
using System.Diagnostics;
using tmAsk.Common;
using tmAsk.Tools;

namespace tmAsk.Manager
{
    public partial class Admin_zip : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            function.CheckAdminLogin();

            //递归展示文件目录
            string template = Request.Params["t"];

            ZipFile zip = new ZipFile();

            string zip_url = zip.ZipDirectory(Server.MapPath("/" + template));//压缩文件 // 

            Response.Write("<a href='" + template + "/" + zip_url + "'>点击下载模板</a> <p>下载完模板，可以用Dreamweaver软件，编辑设计模板</p>");

        }

    }
}